#! /usr/bin/env python3
# -*- coding: utf-8 -*-


import nmlib

agent = nmlib.RestAgent.getAgent()

def get_networks():
    url = f"https://{agent.host}/controller/api/v/networks"
    return agent._get(url)



def main():
    nmlib.print_response(get_networks())



if __name__ == '__main__':
    main()
